<%@ page contentType="text/html;charset=utf-8"%>
<%@ page
	import="java.io.*, java.sql.*, java.util.*, java.text.*, napal.*, util.*, napal.*"%>
<%@ page import="org.apache.ibatis.*"%>
<%@ page import="java.util.Date"%>
<%
	request.setCharacterEncoding("utf-8");

	String m = (String)session.getAttribute("managerID");
	String u = (String)session.getAttribute("userID");
	String check = request.getParameter("check");
%>

<td><%@ include file="./Header.jsp"%></td>
</TR>
<TR HEIGHT="100"> 
<TD>
<a href="PlanInsert.jsp" class="btn btn-link btn-small">일정등록<br></a><br><br>
<%
					
if(m==null){ %>
	<script language=javascript>
				self.window.alert("권한이 없습니다.");
				location.href="Main.jsp?";
			</script>
<%}
else if ("등록".equals(request.getParameter("cmd"))) {
						String n = request.getParameter("start");
						String n2 = request.getParameter("end");
						String n3 = request.getParameter("content");
						String n4 = request.getParameter("check");
						RentalHome.insertplan(n, n2, n3,n4);
				%>
				<script language=javascript>
				self.window.alert("일정이 등록되었습니다.");
				location.href="Main.jsp?id=<%=m%>";
			</script> <%
 	}
					else{
						
					}
 %> 
<%String s1 = request.getParameter("id");%>
<form name="PlanInsert"
					action="PlanInsert.jsp?id=<%=s1%>" method="POST">
<table class="table table-bordered">
	
		<Tr>
			<td>시작날짜</td>
			<Td><input type="text" name="start" placeholder="Text input">( 형식 : 2000-01-01 )</td>
		</tr>
		<tr>
			<td>끝날짜</td>
			<Td><input type="text"  name="end" placeholder="Text input"> 형식 : 2000-01-01 )</td>
		<tr>
			<td>일정명</td>
			<Td><input type="text" name="content"  placeholder="Text input"></td>
		</tr>
		<tr>
			<td>정기점검 여부</td>
			<Td>정기점검(대여불가기간)<input  type="radio" name="check"	value="정기점검">
			기타<input   type="radio" name="check"	value="기타일정"></td>
		</tr>
	</table>
					<input style="width: 50;" name="cmd" class="btn btn-inverse" type=submit value="등록"> 
</form>
</TD>
</TR>

<TR HEIGHT="50">
<TD><%@ include file="./bottom.jsp"%></TD> 
</TR>
</TABLE>

</body>
</html>





